diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 215e7f9..ac71b09 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,30 +7,29 @@ on: jobs: build: - if: false runs-on: ubuntu-latest - + if: contains(github.event.head_commit.message, '[skip ci]') == false steps: - - uses: actions/checkout@v2 - with: - submodules: true - fetch-depth: 0 + - name: 📥 Checkout repository + uses: actions/checkout@v3 - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 + - name: 📸 Calculate commit hash + id: sha + uses: pr-mpt/actions-commit-hash@v2 + + - name: 🔨 Prepare Node environment + uses: actions/setup-node@v4 with: - hugo-version: "0.91.2" - extended: true + node-version: 22 - - name: Build Hugo - run: hugo -D --gc + - name: 🎉 Install project dependencies + run: npm install - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: 16.x - - run: npm ci - - run: npm run build-css + - name: 🏗️ Build app + run: npm run build + env: + PUBLIC_MICROCMS_SERVICE_DOMAIN: ${{ secrets.PUBLIC_MICROCMS_SERVICE_DOMAIN }} + PUBLIC_MICROCMS_API_KEY: ${{ secrets.PUBLIC_MICROCMS_API_KEY }} - name: 📂 Sync files uses: SamKirkland/FTP-Deploy-Action@4.0.0 @@ -38,5 +37,5 @@ jobs: server: ${{ secrets.FTP_SERVER }} username: ${{ secrets.FTP_USERNAME }} password: ${{ secrets.FTP_PASSWARD }} - local-dir: ./public/ + local-dir: ./dist server-dir: /home/${{ secrets.FTP_USERNAME }}/www/misc-mdn/