From 6919663bf68cf2c44bc3176fe358c71c130f9c60 Mon Sep 17 00:00:00 2001 From: yorickdowne <71337066+yorickdowne@users.noreply.github.com> Date: Fri, 30 Aug 2024 16:20:13 -0400 Subject: [PATCH] GH Pages deployment (#453) --- .github/workflows/deploy.yml | 52 +++++++++++++++++++++++++++++++ .github/workflows/test-deploy.yml | 27 ++++++++++++++++ website/static/.nojekyll | 0 website/static/CNAME | 1 + 4 files changed, 80 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/test-deploy.yml create mode 100644 website/static/.nojekyll create mode 100644 website/static/CNAME diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..f2d50087 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,52 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main +defaults: + run: + working-directory: ./website + +jobs: + build: + name: Build Docusaurus + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + + - name: Install dependencies + run: npm ci + - name: Build website + run: npm run build + + - name: Upload Build Artifact + uses: actions/upload-pages-artifact@v3 + with: + path: build + + deploy: + name: Deploy to GitHub Pages + needs: build + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml new file mode 100644 index 00000000..0eef5157 --- /dev/null +++ b/.github/workflows/test-deploy.yml @@ -0,0 +1,27 @@ +name: Test deployment + +on: + pull_request: + branches: + - main +defaults: + run: + working-directory: ./website + +jobs: + test-deploy: + name: Test deployment + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + + - name: Install dependencies + run: npm ci + - name: Test build website + run: npm run build diff --git a/website/static/.nojekyll b/website/static/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/website/static/CNAME b/website/static/CNAME new file mode 100644 index 00000000..5d3b9b49 --- /dev/null +++ b/website/static/CNAME @@ -0,0 +1 @@ +ethdocker.com