From 532152d64caa5b88db36ccc2d15879c16fcf3470 Mon Sep 17 00:00:00 2001 From: Ray Foss Date: Sat, 17 Jun 2023 09:34:32 +0900 Subject: [PATCH 1/6] Create pages.yml --- .github/workflows/pages.yml | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..c6e452d --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,60 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ['main'] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: 'pages' + cancel-in-progress: true + +env: + VITE_BASE: /${{github.event.repository.name}}/ + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: latest + - run: pnpm i --fix-lockfile # Fix version differences + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: lts/* + cache: 'pnpm' + - name: Install dependencies + run: npm i -g @antfu/ni && ni + - name: Build + run: nr build + - name: Pages subfolder fix + run: cp -r dist /tmp/dist && mv /tmp/dist dist/webcontainer-api-starter-gh-pages + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + # Upload dist repository + path: './dist' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 From 4fd8eb7f768bc612888d933491b840622d74d721 Mon Sep 17 00:00:00 2001 From: Ray Foss Date: Sat, 17 Jun 2023 13:14:09 +0900 Subject: [PATCH 2/6] Create CNAME --- CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..1c0dea0 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +wc.42x.app \ No newline at end of file From 9035833fab1194ef13a823c5eb089c23d53ea0a7 Mon Sep 17 00:00:00 2001 From: Ray Foss Date: Sat, 17 Jun 2023 13:22:44 +0900 Subject: [PATCH 3/6] Delete CNAME --- CNAME | 1 - 1 file changed, 1 deletion(-) delete mode 100644 CNAME diff --git a/CNAME b/CNAME deleted file mode 100644 index 1c0dea0..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -wc.42x.app \ No newline at end of file From a9093667e90ebf1d7eb04ed0044b3da4e20fd3bf Mon Sep 17 00:00:00 2001 From: Ray Foss Date: Sat, 17 Jun 2023 00:41:22 -0500 Subject: [PATCH 4/6] Add files via upload --- public/_headers | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 public/_headers diff --git a/public/_headers b/public/_headers new file mode 100644 index 0000000..430bd97 --- /dev/null +++ b/public/_headers @@ -0,0 +1,3 @@ +/* + Cross-Origin-Embedder-Policy: require-corp + Cross-Origin-Opener-Policy: same-origin \ No newline at end of file From 026b12ad927fd2609cace5314adcd891dc4234ca Mon Sep 17 00:00:00 2001 From: Ray Foss Date: Sat, 17 Jun 2023 14:44:12 +0900 Subject: [PATCH 5/6] Delete pages.yml --- .github/workflows/pages.yml | 60 ------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml deleted file mode 100644 index c6e452d..0000000 --- a/.github/workflows/pages.yml +++ /dev/null @@ -1,60 +0,0 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: ['main'] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow one concurrent deployment -concurrency: - group: 'pages' - cancel-in-progress: true - -env: - VITE_BASE: /${{github.event.repository.name}}/ - -jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2 - with: - version: latest - - run: pnpm i --fix-lockfile # Fix version differences - - name: Set up Node - uses: actions/setup-node@v3 - with: - node-version: lts/* - cache: 'pnpm' - - name: Install dependencies - run: npm i -g @antfu/ni && ni - - name: Build - run: nr build - - name: Pages subfolder fix - run: cp -r dist /tmp/dist && mv /tmp/dist dist/webcontainer-api-starter-gh-pages - - name: Setup Pages - uses: actions/configure-pages@v3 - - name: Upload artifact - uses: actions/upload-pages-artifact@v1 - with: - # Upload dist repository - path: './dist' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v1 From c47a3b9bee165a5642d856112ea4565a121da6f1 Mon Sep 17 00:00:00 2001 From: Ray Foss Date: Sat, 17 Jun 2023 14:45:58 +0900 Subject: [PATCH 6/6] Update _headers --- public/_headers | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/_headers b/public/_headers index 430bd97..890f5eb 100644 --- a/public/_headers +++ b/public/_headers @@ -1,3 +1,4 @@ /* Cross-Origin-Embedder-Policy: require-corp - Cross-Origin-Opener-Policy: same-origin \ No newline at end of file + Cross-Origin-Opener-Policy: same-origin +