continuous deployment #48
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Actions CI (Branch) | |
on: | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
environment: | |
name: staging | |
url: https://www-stage.trshcmpctr.com | |
steps: | |
- uses: actions/checkout@v3 | |
- run: node common/scripts/install-run-rush.js install | |
- uses: docker://node:18.16.1 | |
- run: node common/scripts/install-run-rush.js build | |
- run: (cd discord && ./client_config_ci.sh) | |
env: | |
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }} | |
DISCORD_CLIENT_SECRET: ${{ secrets.DISCORD_CLIENT_SECRET }} | |
DISCORD_GUILD_ID: ${{ secrets.DISCORD_GUILD_ID }} | |
DISCORD_SESSION_SECRET: ${{ secrets.DISCORD_SESSION_SECRET }} | |
DISCORD_REDIRECT_URI: ${{ secrets.DISCORD_REDIRECT_URI }} | |
ENVIRONMENT: ${{ secrets.ENVIRONMENT }} | |
- run: (cd deploy && ./client_config_ci.sh) | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- run: node common/scripts/install-run-rush.js lint | |
- run: node common/scripts/install-run-rush.js lint:md | |
- run: node common/scripts/install-run-rush.js test | |
- run: node common/scripts/install-run-rush.js test:cypress --verbose | |
- run: node common/scripts/install-run-rush.js deploy --create-archive deploy.zip | |
# TODO: can we use `npm` binary here? | |
# - run: npm run upload -- ${{ secrets.ENVIRONMENT }} | |
# - run: npm start -- ${{ secrets.ENVIRONMENT }} | |
- run: node deploy/lib/aws-s3-upload-artifacts.js ${{ secrets.ENVIRONMENT }} | |
- run: node deploy/lib/index.js ${{ secrets.ENVIRONMENT }} |