Skip to content

Publish to main instead of gh-pages #11

Publish to main instead of gh-pages

Publish to main instead of gh-pages #11

Workflow file for this run

name: Deploy GitHub Pages with private submodule
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# Inject classic PAT for private submodules
- name: Configure Git for private submodules
run: |
git config --global url."https://${{ secrets.HORSEL_ACCESS }}:@github.com/".insteadOf "https://github.com/"
# Checkout repository without auto submodule update
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: false
# Manually update submodules using PAT
- name: Update submodules
run: |
git submodule sync --recursive
git submodule update --init --recursive
# Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./
publish_branch: main