Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Legendary-Candice-Joe authored Mar 9, 2024
1 parent 4eba8f7 commit ed0e247
Showing 1 changed file with 32 additions and 13 deletions.
45 changes: 32 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,40 @@
on: push
name: Build and deploy GH Pages
name: Assorion Website Deploy

env:
ZOLA_VERSION: "0.15.3"
SOURCE_BRANCH: "main"
TARGET_BRANCH: "gh-pages"

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
issues: write
if: github.ref == 'refs/heads/main'
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: build_and_deploy
uses: shalzz/zola-deploy-action@v0.18.0
env:
PAGES_BRANCH: gh-pages
TOKEN: ${{ secrets.GITHUB_TOKEN}}
- name: Check out repo
uses: actions/checkout@main
- 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: Generate HTML
run: zola build
- name: Deploy to gh-pages
if: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', env.SOURCE_BRANCH) }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages
force_orphan: true

0 comments on commit ed0e247

Please sign in to comment.