Skip to content

Merge pull request #72 from rocky-linux/07-30-fix_need_to_checkout_first #5

Merge pull request #72 from rocky-linux/07-30-fix_need_to_checkout_first

Merge pull request #72 from rocky-linux/07-30-fix_need_to_checkout_first #5

Workflow file for this run

---
name: Build and Deploy docs.rockylinux.org
concurrency: production
on:
push:
branches:
- main
workflow_dispatch:
repository_dispatch:
types: [remote_deploy]
jobs:
build:
name: build
runs-on: ubuntu-latest
container:
image: quay.io/rockylinux/rockylinux:9
options: --user root
outputs:
DOCS_SHA: ${{steps.build.outputs.DOCS_SHA}}
environment: production
steps:
- name: Checkout mkdocs config
uses: actions/checkout@v4
- name: "Build Site"
uses: ./.github/actions/build-and-cache/
- name: set docs-sha
id: docs-sha
run: echo "$DOCS_SHA" >> "$GITHUB_OUTPUT"
deploy:
name: deploy
needs: build
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
id: docs-cache
with:
path: build/site/minified
key: cache-docs-${{ needs.build.outputs.DOCS_SHA }}
fail-on-cache-miss: false
enableCrossOsArchive: true
- name: Retrieve build artifacts
if: steps.docs-cache.outputs.cache-hit != 'true'
uses: actions/download-artifact@v4
with:
name: build-minified
path: |
build/minified/site
- name: Set up Fastly CLI
uses: fastly/compute-actions/setup@v6
with:
cli_version: 'latest'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Dependencies
run: npm install
working-directory: ./compute-js
- name: Build Compute Package
uses: fastly/compute-actions/build@v6
with:
verbose: true
project_directory: compute-js
- name: Deploy Compute Package
uses: fastly/compute-actions/deploy@v6
with:
comment: 'Deployed via GitHub Actions'
project_directory: compute-js
env:
FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}