Add support for generating go module deps #20
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: deploy-docs | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/deploy-docs.yaml' | |
- 'website/**' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/deploy-docs.yaml' | |
- 'website/**' | |
permissions: | |
contents: read | |
jobs: | |
deploy: | |
name: Generate docs website to GitHub Pages | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
defaults: | |
run: | |
working-directory: website | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
- name: Harden Runner | |
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
github.com:443 | |
registry.yarnpkg.com:443 | |
*.githubusercontent.com:443 | |
*.blob.core.windows.net:443 | |
- name: Setup Node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: 20.x | |
- name: Get yarn cache | |
id: yarn-cache | |
run: echo "dir=$(yarn cache dir)" > $GITHUB_OUTPUT | |
- name: Cache dependencies | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: ${{ steps.yarn-cache.outputs.dir }} | |
key: ${{ runner.os }}-website-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-website- | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- name: Deploy to GitHub Pages | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository == 'Azure/dalec' | |
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./website/build | |
destination_dir: ./docs |