From 265f4b68b02073bb87d210a3cc12d66342c24c81 Mon Sep 17 00:00:00 2001 From: Bryce Mehring Date: Thu, 29 Dec 2022 09:44:06 -0600 Subject: [PATCH] Setup publish action upgrade node --- .github/workflows/publish.yml | 33 +++++++++++++++++++++++++++++++++ .nvmrc | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..8bba1cb --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + deployments: write + name: Publish to Cloudflare Pages + steps: + - name: Checkout + uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - run: npm ci + - run: npm run build + + - name: Publish to Cloudflare Pages + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: multiverse + directory: ./dist + gitHubToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/.nvmrc b/.nvmrc index b6a7d89..3c03207 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 +18