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