Update deployment workflow #7
Workflow file for this run
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: 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 | |
steps: | |
- name: Install deps | |
run: dnf -y install python3-pip npm git-core | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: rocky-linux/documentation | |
path: docs | |
fetch-depth: 0 | |
- run: python3.9 -m pip install -r requirements.txt | |
- run: chown -R 1001:1001 . | |
- name: Build Site | |
run: npm run build | |
- name: Archive build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-minified | |
path: | | |
build/minified/site | |
preview: | |
name: preview | |
needs: build | |
runs-on: ubuntu-latest | |
environment: preview | |
defaults: | |
run: | |
working-directory: ./compute-js | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- name: fetch build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-minified | |
- uses: neil-forks/compute-actions/preview@preview-with-subdir | |
with: | |
fastly-api-token: ${{ secrets.FASTLY_API_KEY }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
project_directory: ./compute-js |