Created
March 2, 2024 14:21
-
-
Save Angelfire/4b4b90fbd853aa9e2de7f54b68690200 to your computer and use it in GitHub Desktop.
Deploy dist/ to an S3 bucket
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 to Prod | |
on: | |
workflow_dispatch: | |
jobs: | |
publish-npm: | |
environment: prod | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./canva-login | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set Up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.10.0" | |
registry-url: https://registry.npmjs.org/ | |
- name: Install Dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Deploy to S3 | |
uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
AWS_S3_BUCKET: ${{ vars.AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ vars.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: ${{ vars.AWS_DEFAULT_REGION }} | |
SOURCE_DIR: './canva-login/dist' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment