Resolve error with README.md in github workflow #23
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: Build and Deploy | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 | |
| - name: Setup Node from .nvmrc | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| working-directory: ./homepage | |
| run: pnpm build | |
| - name: Create policies output directory | |
| run: mkdir -p homepage/build/policies | |
| - name: Convert policies to HTML | |
| run: | | |
| npx markdown-to-html-cli policies/privacy-policy.md --output homepage/build/policies/privacy-policy.html --no-dark-mode --title "Praytic Privacy Statement" --github-corners false --readme false | |
| npx markdown-to-html-cli policies/terms-of-service.md --output homepage/build/policies/terms-of-service.html --no-dark-mode --title "Praytic Terms of Service" --github-corners false --readme false | |
| - name: Authenticate to Google Cloud | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| workload_identity_provider: projects/370798368805/locations/global/workloadIdentityPools/github-actions-pool/providers/github-provider | |
| service_account: github-actions-deployer@praytic-global-473807.iam.gserviceaccount.com | |
| - name: Upload homepage to Cloud Storage | |
| uses: google-github-actions/upload-cloud-storage@v2 | |
| with: | |
| path: 'homepage/build' | |
| destination: 'homepage-bucket-a661783' | |
| parent: false | |
| process_gcloudignore: false |