Skip to content

Commit

Permalink
wip for stage deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
pattersonbl2 committed Jun 25, 2024
1 parent ad1d7c6 commit e9a89c5
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions .github/workflows/deploy-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,24 @@ on:
push:
branches:
- gcp-deploy
env:
SITE_URL: https://color.stage.mozaws.net/
ADDON_URL: testing.html
jobs:
build_test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14

- name: Genreate env variables
id : env
run: |
if {github.ref == 'refs/heads/master'}; then
SITE_URL="https://color.firefox.com/"
ADDON_URL="https://addons.mozilla.org/firefox/addon/firefox-color/"
echo "prod" >> $GITHUB_OUPUT
else
SITE_URL="https://color.stage.mozaws.net/"
ADDON_URL="testing.html"
echo "stage" >> $GITHUB_OUPUT
fi
echo "SITE_URL=$SITE_URL" >> $GITHUB_ENV
echo "ADDON_URL=$ADDON_URL" >> $GITHUB_ENV
- name: Install dependencies
run: npm ci

Expand All @@ -47,12 +37,9 @@ jobs:

- name: npm run test
run: npm run test
outputs:
env: ${{ steps.env.outputs.GITHUB_OUPUT }}


deploy_gcp:
if: ${{ needs.build_test.outputs.env == 'stage' }}
environment: production
environment: stage
needs: build_test
runs-on: ubuntu-latest

Expand Down

0 comments on commit e9a89c5

Please sign in to comment.