Merge pull request #76 from NethermindEth/ev/grpc-streaming #197
This file contains hidden or 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 to GitHub Pages | |
on: | |
push: | |
branches: | |
- trunk # Trigger deployment when changes are pushed to the `trunk` branch | |
pull_request: | |
branches: | |
- trunk # Trigger deployment when a pull request is merged into the `trunk` branch | |
permissions: | |
contents: write # allow token to write to the repository contents | |
pages: write # allow the token to deploy to Github Pages | |
jobs: | |
build: | |
runs-on: ubuntu-latest # Use the latest Ubuntu runner for the job | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
# Step 2: Set up Node.js and install pnpm | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '22' # Use your desired Node.js version | |
- name: Install pnpm | |
run: npm install -g pnpm | |
# Step 3: Install dependencies | |
- name: Install dependencies with pnpm | |
run: pnpm install | |
working-directory: ./vocs-docs | |
# Step 4: Build the project | |
- name: Build project | |
run: pnpm run build # Ensure this is the correct build command for your project | |
working-directory: ./vocs-docs | |
- name: Upload static files as artifact | |
id: deployment | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: vocs-docs/docs/dist/ | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to Github Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} |