From 2ecace41a566877b7ebf1f45d3227ad0257a542b Mon Sep 17 00:00:00 2001 From: Michel Date: Tue, 5 Nov 2024 20:06:35 +0100 Subject: [PATCH] Adds deploy action --- .forgejo/workflows/deploy.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .forgejo/workflows/deploy.yml diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml new file mode 100644 index 0000000..67de187 --- /dev/null +++ b/.forgejo/workflows/deploy.yml @@ -0,0 +1,35 @@ +on: + push: + branches: + - 'master' +jobs: + build: + runs-on: docker + steps: + - name: Checkout + env: + REPO: '${{ github.repository }}' + TOKEN: '${{ secrets.GITHUB_TOKEN }}' + BRANCH: '${{ env.GITHUB_REF_NAME }}' + GIT_SERVER: 'git.php.fail' + run: | + git clone --branch $GITHUB_REF_NAME https://${TOKEN}@${GIT_SERVER}/${REPO}.git . + git fetch + git checkout ${{ github.head_ref }} + - name: Install PHP Dependencies + run: | + docker run --rm --interactive --tty \ + --volume $PWD:/app \ + composer \ + cd /app && composer install + - name: Build NPM folder + run: | + docker run --rm --interactive --tty \ + --volume $PWD:/app \ + node \ + cd /app && npm install && npm run build + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: /app + path: . \ No newline at end of file