citra-web/.github/workflows/deploy.yml
liushuyu 245eaf7448
Transition to GitHub Actions (#136)
* gulpfile.js: fix ESLint warnings

* package.json: add shortcut scripts

* scripts/games: do a shallow git clone to save time

* ci: migrate to GitHub Actions
2020-11-05 13:23:06 +05:30

45 lines
1.2 KiB
YAML

name: Deploy Site
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
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/wiki/ && yarn && popd
pushd ./scripts/games/ && yarn && popd
hugo version
- name: Build
env:
TENANT: 'citra'
run: |
echo '========== Starting gulp deploy task =========='
yarn run build
- name: Deploy
if: ${{ (! github.base_ref) && (github.repository == 'citra-emu/citra-web') }}
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY_NAME: CitraBotWeb/CitraBotWeb.github.io
BRANCH: master
FOLDER: build
CLEAN: true
SINGLE_COMMIT: true