foss4gnl 2023 map5topo #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From: https://github.com/victoriadrake/hugo-latest-cd | |
# Credits: https://github.com/victoriadrake | |
# LICENSE: https://github.com/victoriadrake/hugo-latest-cd/blob/master/LICENSE | |
# | |
# Changes by Just van den Broecke: | |
# - use https://github.com/marketplace/actions/deploy-to-github-pages | |
name: publish-justobjects-website | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Check out master | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
submodules: true | |
- name: π¨ Set up Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12.x | |
- name: π§ Install tools | |
run: | | |
sudo apt install curl jq | |
npm install postcss-cli autoprefixer | |
- name: π€΅ Install Hugo | |
run: | | |
HUGO_VERSION=0.83.1 | |
mkdir tmp/ && cd tmp/ | |
curl -sSL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz | tar -xvzf- | |
sudo mv hugo /usr/local/bin/ | |
cd .. && rm -rf tmp/ | |
hugo version | |
- name: π³ Build site justobjects.nl | |
run: ./generate.sh | |
- name: Deploy π | |
uses: JamesIves/github-pages-deploy-action@4.1.4 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: dist # The folder the action should deploy. | |
# - name: π Deploy build | |
# run: | | |
# git config user.name "${GITHUB_ACTOR}" | |
# git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
# git add . | |
# git commit -am "π Deploy with ${GITHUB_WORKFLOW}" | |
# git push --all -f https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git |