Bump @babel/traverse from 7.20.13 to 7.23.2 in /docs (#246) #40
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 website to Pages | |
on: | |
push: # Runs on pushes targeting the default branch | |
branches: | |
- master | |
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab | |
permissions: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: # Allow one concurrent deployment | |
group: "pages" | |
cancel-in-progress: true | |
defaults: # Default to bash | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Number of commits to fetch. 0 indicates all history for all branches and tags. | |
- name: Get current version | |
id: version | |
uses: WyriHaximus/github-action-get-previous-tag@v1 | |
with: | |
fallback: "X.X.X" # Optional fallback tag to use when no tag can be found | |
- name: Detect package manager | |
id: detect-package-manager | |
working-directory: ./docs | |
run: | | |
if [ -f "yarn.lock" ]; then | |
echo "manager=yarn" >> $GITHUB_OUTPUT | |
echo "command=install" >> $GITHUB_OUTPUT | |
exit 0 | |
elif [ -f "package.json" ]; then | |
echo "manager=npm" >> $GITHUB_OUTPUT | |
echo "command=ci" >> $GITHUB_OUTPUT | |
exit 0 | |
else | |
echo "Unable to determine packager manager" | |
exit 1 | |
fi | |
- name: change directory | |
run: cd ./docs | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
cache: ${{ steps.detect-package-manager.outputs.manager }} | |
cache-dependency-path: docs/yarn.lock | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v3 | |
- name: Restore cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
docs/build | |
docs/.docusaurus | |
key: ${{ runner.os }}-docusaurus-build-${{ hashFiles('docs/build') }} | |
restore-keys: | | |
${{ runner.os }}-docusaurus-build- | |
- name: Install dependencies | |
working-directory: ./docs | |
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} | |
- name: Build | |
working-directory: ./docs | |
env: | |
CONSUL_DOT_NET_VERSION: ${{ steps.version.outputs.tag }} | |
run: ${{ steps.detect-package-manager.outputs.manager }} run build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ./docs/build | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |