Secure pi (#77) #105
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
# This is a basic workflow to help you get started with Actions | |
name: validate | |
# Controls when the action will run. | |
on: | |
push: | |
branches: | |
- '!master' # excludes master | |
- '!main' # excludes main | |
- '**' # matches every branch | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Web Repo | |
uses: actions/checkout@v2 | |
with: | |
repository: davidgs/DavidgsWeb | |
submodules: true # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
path: ./DavidgsWeb | |
- name: Checkout Translate | |
uses: actions/checkout@v2 | |
with: | |
repository: davidgs/Translator | |
path: ./translate | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
hugo-version: '0.133.0' | |
extended: true | |
- name: Setup go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: '1.23' | |
- name: Build Translator | |
run: cd ./translate; go build translate.go | |
- name: Create Secret | |
uses: jsdaniell/[email protected] | |
with: | |
name: "./translate/google-secret.json" | |
json: ${{ secrets.TRANSLATE_SECRET }} | |
- name: Translate | |
run: cd ./translate; ./translate ../DavidgsWeb/content/posts/ | |
- name: ReCommit | |
# run: cd ./DavidgsWeb | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
# Optional, but recommended | |
# Defaults to "Apply automatic changes" | |
commit_message: Apply Auto-Translations | |
# branch: main | |
# file_pattern: index.*.md | |
repository: ./DavidgsWeb |