CI: create a platform-agnostic script for any CI system
This commit is contained in:
parent
3bad87b6c1
commit
87a03e5ceb
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
echo -e '\e[1m\e[36m========== Installing gulp & dependencies ==========\e[0m'
|
||||||
|
yarn install
|
||||||
|
# Install dependencies one-by-one to avoid race-conditions
|
||||||
|
yarn --cwd ./scripts/shared-hugo-scripts/wiki/
|
||||||
|
yarn --cwd ./scripts/shared-hugo-scripts/compatdb/
|
||||||
|
yarn hugo version
|
||||||
|
echo -e '\e[1m\e[36m========== Starting gulp deploy task ===============\e[0m'
|
||||||
|
yarn run build
|
||||||
|
|
||||||
|
echo -e '\e[1m\e[32m Success! Site deployed to `build` folder.\e[0m'
|
|
@ -19,20 +19,11 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo '========== Installing gulp & dependencies =========='
|
echo '========== Installing gulp & dependencies =========='
|
||||||
sudo apt-get install graphicsmagick
|
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
|
- name: Build
|
||||||
env:
|
env:
|
||||||
TENANT: 'citra'
|
TENANT: 'citra'
|
||||||
GITHUB_WIKI_URL: 'https://github.com/citra-emu/citra.wiki.git'
|
GITHUB_WIKI_URL: 'https://github.com/citra-emu/citra.wiki.git'
|
||||||
run: |
|
run: ./.ci/build.sh
|
||||||
echo '========== Starting gulp deploy task =========='
|
|
||||||
yarn run build
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
if: ${{ ! github.base_ref }}
|
if: ${{ ! github.base_ref }}
|
||||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||||
|
|
Reference in New Issue