-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (43 loc) · 1.56 KB
/
upload-example-vite.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: GitHub Actions Demo
run-name: Upload example-vite to Google Cloud Storage
on: [push]
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile --strict-peer-dependencies
- name: Build
run: pnpm run build
- uses: "google-github-actions/auth@v2"
with:
project_id: "spaceblanc"
workload_identity_provider: projects/670988994997/locations/global/workloadIdentityPools/github/providers/ukstv-github
service_account: [email protected]
- id: "upload-file"
uses: "google-github-actions/upload-cloud-storage@v2"
with:
path: "${{ github.workspace }}/examples/example-vite/dist"
destination: "skyward-public.ukstv.me"
parent: false