Feat: Only view public games in open games page (#98) #177
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: Deploy universal web build as serverless lambda | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- develop | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- run: | | |
npm install | |
npm run build | |
cd _sls_lambda_universal | |
npm install | |
npm run deploy-${{ steps.extract_branch.outputs.branch }} | |
env: | |
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} | |
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} | |
ROLLBAR_SERVER_API_KEY: ${{secrets.ROLLBAR_SERVER_API_KEY}} | |
- name: Invalidate CloudFront | |
uses: chetan/invalidate-cloudfront-action@v2 | |
env: | |
DISTRIBUTION: ${{ secrets[format('DISTRIBUTION_{0}', steps.extract_branch.outputs.branch)] }} | |
PATHS: "/index.html /ngsw.json" | |
AWS_REGION: "us-east-1" | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |