Add .pre-commit-config.yaml #75
Workflow file for this run
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 and deploy site | |
on: | |
pull_request: | |
push: | |
branches: | |
- src | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build website | |
runs-on: ubuntu-latest | |
env: | |
DRY_RUN: ${{ github.event_name == 'pull_request' }} | |
DEPLOY: "" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Should I deploy? | |
run: | | |
if [[ "$DRY_RUN" != "true" ]]; then | |
echo "DEPLOY='and Deploy'" >> $GITHUB_ENV | |
echo "Deploy website" | |
else | |
echo "do NOT Deploy website" | |
fi | |
- name: Build Website ${{ env.DEPLOY }} | |
uses: getnikola/nikola-action@v4 | |
with: | |
dry_run: ${{ env.DRY_RUN }} |