Skip to content

Commit

Permalink
Merge pull request #3 from deccer/main
Browse files Browse the repository at this point in the history
Replace Zola stuff with Docusaurus
  • Loading branch information
deccer authored Oct 26, 2024
2 parents 1dfe14d + 5d9e751 commit a9e6878
Show file tree
Hide file tree
Showing 49 changed files with 16,615 additions and 1,142 deletions.
79 changes: 32 additions & 47 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,51 @@
name: Deploy to Pages
name: Deploy to GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# 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

# Default to bash
defaults:
run:
shell: bash
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
# Build job
build:
name: Build Docusaurus
runs-on: ubuntu-latest
env:
ZOLA_VERSION: "0.19.1"
steps:
- name: Install Zola
run: |
set -x
wget -O - \
"https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
| sudo tar xzf - -C /usr/local/bin
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build with Zola
run: |
zola build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
node-version: 18
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public
path: build

# Deployment job
deploy:
name: Deploy to GitHub Pages
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
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@v2
uses: actions/deploy-pages@v4
Loading

0 comments on commit a9e6878

Please sign in to comment.