name: Docs on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: name: Build docs runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 14.x - uses: actions/setup-python@v1 with: python-version: 3.6 - run: npm i -g staticrypt - run: pip install -r requirements.docs.txt - run: mkdocs build - run: | mkdir -p build/site rsync -r --exclude="*.html" site build find ./site -type f -name "*.html" -exec staticrypt {} MY_PASSWORD -o ./build/{} -f docs/template.html \; - uses: actions/checkout@v2 - name: Deploy to Netlify if: github.event_name == 'push' && github.ref == 'refs/heads/master' uses: nwtgck/actions-netlify@v1.2 with: publish-dir: './build/site' production-branch: master github-token: ${{ secrets.GITHUB_TOKEN }} deploy-message: "Deploy from GitHub Actions" enable-pull-request-comment: false enable-commit-comment: true overwrites-pull-request-comment: true env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} timeout-minutes: 1