Update actions/checkout action to v4.1.7 (#34) #82
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
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 1 1 *' | |
repository_dispatch: | |
types: [build-and-deploy] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
submodules: recursive # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # v2.6.0 | |
with: | |
hugo-version: 'latest' | |
- name: Build | |
run: hugo --minify | |
- name: Copy CNAME and robots.txt | |
run: cp CNAME robots.txt public | |
# Deploy site | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@5c6e9e9f3672ce8fd37b9856193d2a537941e66c # v4.6.1 | |
with: | |
token: ${{ secrets.DEPLOY_TOKEN }} | |
git-config-email: ${{ secrets.GIT_CONFIG_EMAIL }} | |
git-config-name: ${{ secrets.GIT_CONFIG_NAME }} | |
branch: github-pages | |
folder: public | |
repository-name: michael-valdron/michael-valdron.github.io | |
clean: true |