diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 022daa3..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Npm build - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18.x] - - steps: - - uses: actions/checkout@v3 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Build - run: | - npm install - npm run build diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 4a64129..50a2c7b 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -31,13 +31,31 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + - name: Setup Pages uses: actions/configure-pages@v4 + + - name: Install dependencies and build + run: | + if [ -f package-lock.json ]; then + npm ci + else + npm install + fi + + npm run build + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - # Upload entire repository - path: "." + # Upload the built site + path: "./_site" + - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4