Readme updated #6
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: Publish website to india-dev-stack.com | |
on: | |
push: | |
tags: | |
- 'release-*' | |
jobs: | |
build-n-upload: | |
runs-on: ubuntu-latest | |
# Add "id-token" with the intended permissions. | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@master | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18.19.0' | |
- name: Cache Node.js Modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: npm- | |
- name: Install dependencies | |
run: npm install | |
- name: Build Astro | |
run: npm run build | |
- name: Read GCP credentials | |
id: 'auth' | |
uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | |
- name: 'Set up GCP SDK' | |
uses: 'google-github-actions/setup-gcloud@v2' | |
- name: 'Upload using gcloud CLI (rsync)' | |
run: 'gsutil -m rsync -R -d dist gs://india-dev-stack-com/' |