Skip to content

Instantly share code, notes, and snippets.

@carlogilmar
Last active April 15, 2022 19:43
Show Gist options
  • Save carlogilmar/9f2fe8d43313501b459f9381e36eeb9b to your computer and use it in GitHub Desktop.
Save carlogilmar/9f2fe8d43313501b459f9381e36eeb9b to your computer and use it in GitHub Desktop.
name: Build Personal Blog
on: push
jobs:
build:
name: Build and update website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Setup GoHugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.92.0'
- name: Commit Update
run: |
echo ":: Eliminando versión previa ::"
rm -rf docs
- name: Build drafts
run: hugo -D
- name: Commit Update
run: |
echo ":: Renombrando nueva version ::"
mv public/ docs/
git config --global user.email "launchx@innovaccion.mx"
git config --global user.name "Launch X Backend Node JS"
git add .
git commit -m "GitHub Actions: Build ok"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment