Pipeline #134
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
name: Pipeline | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * 5' | |
workflow_dispatch: | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '14' | |
cache: 'npm' | |
- name: Install dependencies | |
run: | | |
npm ci | |
npm install -g gulp-cli | |
- name: Build | |
run: gulp build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: website-build | |
path: build | |
Deploy: | |
runs-on: ubuntu-latest | |
needs: Build | |
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: website-build | |
path: /tmp/website-build | |
- uses: actions/checkout@v3 | |
- name: Deploy website | |
run: | | |
ROOT_CONFIG=$(pwd)/.git/config | |
cd /tmp/website-build/ | |
touch .nojekyll | |
echo 'f4pga.org' > CNAME | |
git init | |
cp "$ROOT_CONFIG" ./.git/config | |
git add . | |
git config --local user.email "push@gha" | |
git config --local user.name "GHA" | |
git commit -am "update ${{ github.sha }}" | |
git push -u origin +HEAD:gh-pages | |