mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 08:55:32 -04:00
switch from docker action to simple bash commands
This commit is contained in:
31
.github/workflows/gh-pages.yml
vendored
31
.github/workflows/gh-pages.yml
vendored
@@ -16,14 +16,27 @@ jobs:
|
||||
# pull from custom Hugo Extended image with opinionated changes
|
||||
# Docker hub: https://hub.docker.com/r/jakejarvis/hugo-custom
|
||||
# base Dockerfile source: https://go.jarv.is/hugo-dockerfile
|
||||
- uses: docker://jakejarvis/hugo-custom:latest
|
||||
- name: Build Hugo
|
||||
uses: docker://jakejarvis/hugo-custom:latest
|
||||
with:
|
||||
args: --gc --cleanDestinationDir
|
||||
- uses: jakejarvis/github-pages-deploy-action@master
|
||||
env:
|
||||
PAGES_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }}
|
||||
PAGES_CNAME: 'jarv.is'
|
||||
PAGES_SOURCE_FOLDER: 'public'
|
||||
PAGES_SOURCE_BRANCH: 'master'
|
||||
PAGES_TARGET_BRANCH: 'master'
|
||||
PAGES_TARGET_REPO: 'jakejarvis.github.io'
|
||||
# native git commands for speed and simplicity, and because this
|
||||
# setup is a weird edge case not worth making an action for.
|
||||
- name: Push to jakejarvis.github.io
|
||||
shell: bash
|
||||
run: |
|
||||
# copy Hugo output to somewhere we have permissions
|
||||
mkdir gh-pages
|
||||
cp -r public/* gh-pages
|
||||
cd gh-pages
|
||||
# CNAME file for GitHub Pages custom domain
|
||||
echo "jarv.is" > CNAME
|
||||
# set up git
|
||||
git init
|
||||
git config user.name "Jake Jarvis"
|
||||
git config user.email "jakejarvis@users.noreply.github.com"
|
||||
# deploy folder to external *.github.io repository
|
||||
git remote add target https://${{ secrets.GITHUB_ACCESS_TOKEN }}@github.com/jakejarvis/jakejarvis.github.io.git
|
||||
git add -A
|
||||
git commit -m "GitHub Pages deploy from $GITHUB_REPOSITORY@$GITHUB_SHA"
|
||||
git push --force target master
|
||||
|
Reference in New Issue
Block a user