Migrate to GitHub Actions (#209)

* ci: switch to GitHub Actions

* scripts: update shared-hugo-scripts

* ci: install dependencies before hand

* ci: add public environment variables
This commit is contained in:
liushuyu 2020-11-02 21:55:19 -07:00 committed by GitHub
parent f6f1fe40d6
commit ee70a071aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 1 deletions

44
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,44 @@
name: Deploy Site
on:
push:
branches: [ hugo ]
pull_request:
branches: [ hugo ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install dependencies
run: |
echo '========== Installing gulp & dependencies =========='
sudo apt-get install graphicsmagick
wget -O hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.deb
sudo dpkg -i hugo.deb
yarn install
# Install dependencies one-by-one to avoid race-conditions
pushd ./scripts/shared-hugo-scripts/wiki/ && yarn && popd
pushd ./scripts/shared-hugo-scripts/compatdb/ && yarn && popd
hugo version
- name: Build
env:
GITHUB_WIKI_URL: 'https://github.com/yuzu-emu/yuzu-games-wiki.wiki.git'
TENANT: 'yuzu'
run: |
echo '========== Starting gulp deploy task =========='
yarn run build
- name: Deploy
if: ${{ ! github.base_ref }}
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: master
FOLDER: build
CLEAN: true
SINGLE_COMMIT: true

@ -1 +1 @@
Subproject commit ccbc6671f302fe2f8ad9efcc78616ecf636888eb Subproject commit 3a78c188239c90cb302e4bd39ac2f2cc3880ba48