Skip to content

Bump js-yaml from 4.1.0 to 4.1.1 in /website (#4596) #61

Bump js-yaml from 4.1.0 to 4.1.1 in /website (#4596)

Bump js-yaml from 4.1.0 to 4.1.1 in /website (#4596) #61

Workflow file for this run

name: Build and deploy website to GitHub Pages
on:
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
push: # Runs on pushes targeting the main branch, for deployment
branches:
- master
paths:
- "website/**"
- ".github/workflows/website.yml"
pull_request: # Runs on pull requests targeting the main branch, for validation
branches:
- master
paths:
- "website/**"
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_REPOSITORY_URL: 'https://github.com/${{ github.repository }}'
outputs:
HAS_PAGES: ${{ steps.has-pages.outputs.HAS_PAGES }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch full git history (not shallow), required for lastModified on content pages
- name: Set HAS_PAGES to output
id: has-pages
run: echo "HAS_PAGES=$(gh api repos/${{ github.repository }} --jq .has_pages)" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set NEXT_PUBLIC_BASE_PATH to environment variable when repository is a fork
if: github.repository_owner != 'armadaproject' || github.event.repository.fork == 'true'
run: echo "NEXT_PUBLIC_BASE_PATH=/$(basename ${{ github.repository }})" >> $GITHUB_ENV
- uses: actions/setup-node@v6
with:
node-version: "lts/*"
cache: yarn
cache-dependency-path: website/yarn.lock
- name: Setup Pages
uses: actions/configure-pages@v5
if: github.ref == 'refs/heads/master' && steps.has-pages.outputs.HAS_PAGES == 'true'
- name: Restore cache
uses: actions/cache@v5
with:
path: |
website/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('website/yarn.lock') }}-${{ hashFiles('website/**.[jt]s', 'website/**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('website/yarn.lock') }}-
- run: yarn install
working-directory: website
- run: yarn content:check
working-directory: website
- run: yarn spell:check
working-directory: website
- run: yarn format:check
working-directory: website
- run: yarn lint:check
working-directory: website
- run: yarn build
working-directory: website
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEXT_PUBLIC_REPOSITORY_URL: ${{ env.NEXT_PUBLIC_REPOSITORY_URL }}
NEXT_PUBLIC_BASE_PATH: ${{ env.NEXT_PUBLIC_BASE_PATH }}
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID: ${{ vars.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
if: github.ref == 'refs/heads/master' && steps.has-pages.outputs.HAS_PAGES == 'true'
with:
path: website/out
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master' && needs.build.outputs.HAS_PAGES == 'true'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4