Skip to content

Update deployment workflow #24

Update deployment workflow

Update deployment workflow #24

Workflow file for this run

---
name: Fastly Compute Branch Previews
concurrency:
group: ${{ github.head_ref || github.run_id }}-${{ github.workflow}}
on:
pull_request:
types: [opened, synchronize, reopened, closed]
jobs:
build:
name: build
runs-on: ubuntu-latest
container:
image: quay.io/rockylinux/rockylinux:9
options: --user root
environment: preview
outputs:
DOCS_SHA: ${{steps.build.outputs.DOCS_SHA}}
steps:
- name: Checkout mkdocs config
uses: actions/checkout@v4
- name: "Build Site"
id: build
uses: ./.github/actions/build-and-cache/
- name: set docs-sha
id: docs-sha
run: echo "$DOCS_SHA" >> "$GITHUB_OUTPUT"
preview:
name: preview
needs: build
runs-on: ubuntu-latest
environment: preview
defaults:
run:
working-directory: ./compute-js
shell: bash
steps:
- uses: actions/checkout@v4
- run: ls -la ../
- uses: actions/cache/restore@v4
id: docs-cache
with:
path: .
key: cache-docs-${{ needs.build.outputs.DOCS_SHA }}
- run: ls -la ../
- uses: neil-forks/compute-actions/preview@preview-with-subdir
with:
fastly-api-token: ${{ secrets.FASTLY_API_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
project_directory: ./compute-js