Skip to content

Commit

Permalink
update docs workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Labarussias <[email protected]>
  • Loading branch information
Issif committed Feb 1, 2024
1 parent 13ab4e6 commit 389b3d0
Showing 1 changed file with 52 additions and 13 deletions.
65 changes: 52 additions & 13 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,63 @@
name: Push to GitHub Pages on push to main
name: Github Pages
on:
push:
branches:
- main
- hugo-docs

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
name: Deploy
# Build job
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.118.2
steps:
- name: Checkout code
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v4
- name: Deploy the site
working-directory: docs-website
uses: benmatselby/hugo-deploy-gh-pages@main
with:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
HUGO_VERSION: 0.118.2
TARGET_REPO: issif/falco-talon
TARGET_BRANCH: ${{ var.GITHUB_BASE_REF }}
TOKEN: ${{ secrets.TOKEN }}
HUGO_ARGS: '-gc --minify'
CNAME: issif.github.io
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 389b3d0

Please sign in to comment.