Rework deployment to use astro's action and break into two jobs #12
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 site to Fastly Compute@Edge (C@E) | |
on: | |
push: | |
branches: [main] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout your repository using git | |
uses: actions/checkout@v4 | |
- name: Install, build, and upload your site output | |
uses: withastro/action@v1 | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Fastly dependencies | |
run: npm install | |
working-directory: ./compute-js | |
- name: fastly compute deploy | |
uses: fastly/compute-actions@v5 | |
with: | |
project_directory: “compute-js” | |
comment: “Deployed via GitHub Actions” | |
env: | |
FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }} |