Merge pull request #106 from DepsHubHQ/86-improve-the-documentation-2 #12
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: docs-release | |
on: | |
push: | |
branches: [main] | |
paths: [docs/**] | |
workflow_dispatch: | |
defaults: | |
run: | |
working-directory: docs | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Restore node_modules cache | |
uses: actions/cache@v4 | |
with: | |
path: docs/node_modules | |
key: ${{ runner.os }}-node_modulesV1-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node_modulesV1- | |
- name: Build | |
run: yarn install && yarn build | |
- name: Auth | |
uses: google-github-actions/auth@v2 | |
with: | |
workload_identity_provider: ${{secrets.WORKLOAD_IDENTITY_PROVIDER_ID}} | |
service_account: ${{ secrets.SERVICE_ACCOUNT }} | |
- name: Upload | |
uses: google-github-actions/upload-cloud-storage@v1 | |
with: | |
path: docs/dist | |
destination: docs.depshub.com | |
parent: false | |
- name: 'Set up Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v2' | |
# - name: 'Invalidate CDN cache' | |
# run: 'gcloud compute url-maps invalidate-cdn-cache fe-loadbalancer --path "/*" --async' |