Skip to content

Commit

Permalink
add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sragss committed Mar 14, 2024
1 parent 3e1208e commit 195b6f5
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/deploy-mdbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy mdBook to GCS

on:
push:
branches:
- main # Or your default branch

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@master
with:
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ secrets.GCP_PROJECT_ID }}

- name: Build mdBook
run: |
curl -L https://github.com/rust-lang/mdBook/releases/latest/download/mdbook-v0.4.12-x86_64-unknown-linux-gnu.tar.gz | tar xzf -
./mdbook build
- name: Deploy to Google Cloud Storage
run: gsutil -m rsync -d -r ./book gs://$GCS_BUCKET_NAME

0 comments on commit 195b6f5

Please sign in to comment.