mirror of
https://github.com/rvtr/wiki.git
synced 2025-06-18 19:15:35 -04:00
Migrate fully to GitHub Actions for Pages deployment
Legacy deploy environments (including simply having something in gh-pages!) is deprecated too. GitHub really wants us to use their deploy-pages system for this, so switch to it.
This commit is contained in:
parent
38e24d8953
commit
025aa772fd
34
.github/workflows/publish.yml
vendored
34
.github/workflows/publish.yml
vendored
@ -6,7 +6,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
doc-deploy:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -14,6 +14,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Configure GitHub Pages
|
||||||
|
uses: actions/configure-pages@v3
|
||||||
|
|
||||||
- uses: ruby/setup-ruby@v1
|
- uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: '3.2'
|
ruby-version: '3.2'
|
||||||
@ -23,14 +26,23 @@ jobs:
|
|||||||
# Build the site using Jekyll
|
# Build the site using Jekyll
|
||||||
run: JEKYLL_ENV=production bundle exec jekyll build
|
run: JEKYLL_ENV=production bundle exec jekyll build
|
||||||
|
|
||||||
# Copy (or touch) other needed files
|
- name: Upload GitHub Pages artifact
|
||||||
# .nojekyll: to tell GH Pages to not rebuild (lol)
|
uses: actions/upload-pages-artifact@v3
|
||||||
- name: Post-Jekyll build copy files
|
|
||||||
run: touch _site/.nojekyll
|
|
||||||
|
|
||||||
- name: Deploy 🚀
|
# Deployment job
|
||||||
uses: JamesIves/github-pages-deploy-action@v4
|
deploy:
|
||||||
with:
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||||
branch: gh-pages # The branch the action should deploy to.
|
permissions:
|
||||||
folder: _site # The folder the action should deploy.
|
contents: read
|
||||||
clean: true # Automatically remove deleted files from the deploy branch
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user