From fa43f0d9d4fa50919291b77944892b8b63ea61d3 Mon Sep 17 00:00:00 2001 From: Kazunari Hara Date: Mon, 29 Jul 2024 13:16:51 +0900 Subject: [PATCH] chore: deploy css to serve as a package --- .github/workflows/deploy.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..882dc61 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,24 @@ +name: deploying + +on: + push: + tags: + - 'v*' + +jobs: + deploying: + name: deploying + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - name: Get version number from tag name + run: echo VERSION=${GITHUB_REF#refs/tags/v} >> $GITHUB_ENV + - uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_SA_KEY }} + - uses: google-github-actions/setup-gcloud@v2 + - name: Deploy to Cloud Storage + run: | + gsutil -h "Cache-Control:public, max-age=31536000, immutable" cp ameba-color-palette.css gs://${{ secrets.GCS_BUCKET }}/packages/@openameba/ameba-color-palette.css@${{ env.VERSION }}/ameba-color-palette.css + gsutil -h "Cache-Control:public, max-age=300" cp ameba-color-palette.css gs://${{ secrets.GCS_BUCKET }}/packages/@openameba/ameba-color-palette.css/ameba-color-palette.css