diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 5cbd5e0..b6a5cca 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -6,18 +6,17 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: webfactory/ssh-agent@v0.7.0 - with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: - php-version: '7.4' - - uses: actions/setup-node@v3 + php-version: '8.1' + - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 - run: npm install - run: ./build.sh + env: + GH_ENGINIRO_TOKEN: ${{ secrets.GH_ENGINIRO_TOKEN }} - run: touch build/site/.nojekyll - uses: actions/upload-pages-artifact@v1 with: diff --git a/build.sh b/build.sh index 124bf14..49e84bc 100755 --- a/build.sh +++ b/build.sh @@ -26,6 +26,10 @@ while read -r repository; do git pull cd ../ else + if [ "$GH_ENGINIRO_TOKEN" != "" ]; then + repository="$(echo "$repository" | sed "s%git@github.com:enginiro/%https://enginiro:$GH_ENGINIRO_TOKEN@github.com/enginiro/%")" + fi + git clone --depth 1 "$repository" --branch "main" --single-branch fi