update dependencies #26
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: Build Website | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build website | |
run: npm run build | |
- name: Deploy to asf-site | |
if: ${{ github.repository_owner == 'apache' && github.event_name != 'pull_request' && github.ref_name == 'master' }} | |
run: | | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email '[email protected]' | |
git fetch | |
git checkout asf-site | |
cp -a _site/. . | |
git add -A | |
git diff-index --quiet HEAD || git commit -m "Deploy site" | |
git push origin asf-site |