From a046856314670f6b6d767f6b031e9418916377b5 Mon Sep 17 00:00:00 2001 From: Dan Rice Date: Tue, 10 May 2022 22:31:26 -0400 Subject: [PATCH] Publish to GitHub Pages --- .github/workflows/publish.yml | 35 +++++++++++++++++++++++++++++++++++ CNAME | 1 - static/CNAME | 1 + 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml delete mode 100644 CNAME create mode 100644 static/CNAME diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..1a7a244 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,35 @@ +--- +name: Publish to GitHub Pages + +on: [ pull_request, push ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 14 + - run: npm install + - run: npm run deploy + - uses: actions/upload-artifact@v3 + with: + name: dist + path: _dist + + publish: + if: github.ref == 'refs/heads/main' + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v3 + with: + name: dist + path: _dist + - uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _dist + permissions: + contents: write diff --git a/CNAME b/CNAME deleted file mode 100644 index 3bf2746..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -nerves-hub.org diff --git a/static/CNAME b/static/CNAME new file mode 100644 index 0000000..a376d6e --- /dev/null +++ b/static/CNAME @@ -0,0 +1 @@ +www.nerves-hub.org