Skip to content

Deploy to GitHub Pages #64

Deploy to GitHub Pages

Deploy to GitHub Pages #64

Workflow file for this run

name: Deploy to GitHub Pages
on:
workflow_dispatch:
workflow_run:
workflows: ["Prepare data"]
branches: [master]
types:
- completed
permissions:
contents: write
jobs:
build_site:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: front-end
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Copy files to local directory
run: |
aws s3 sync "s3://${{ secrets.BUCKET }}/processed/" "static/assets/data/"
- name: Install dependencies
run: npm ci
- name: Load copy data
run: npm run google
- name: Build 🔧
env:
BASE_PATH: '/${{ github.event.repository.name }}'
run: npm run build
- name: Upload Artifacts
uses: actions/upload-pages-artifact@v2
with:
# this should match the `pages` option in your adapter-static options
path: 'front-end/build/'
deploy:
needs: build_site
runs-on: ubuntu-latest
defaults:
run:
working-directory: front-end
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v2