Skip to content

oops (#70)

oops (#70) #92

Workflow file for this run

# This is a basic workflow to help you get started with Actions

Check failure on line 1 in .github/workflows/push.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/push.yml

Invalid workflow file

you may only define one of `branches` and `branches-ignore` for a single event
name: validate
# Controls when the action will run.
on:
push:
branches:
- '!master' # excludes master
- '!main' # excludes main
- '**' # matches every branch
branches-ignore:
- 'master' # excludes master
- 'main' # excludes main
# 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