From eec934afc10371a2df79a4e84b4b14634827b650 Mon Sep 17 00:00:00 2001 From: Samuel Philipp Date: Wed, 6 Dec 2023 23:22:12 +0100 Subject: [PATCH] migrated woodpecker to forgejo workflow --- .forgejo/workflows/build-deploy.yml | 54 +++++++++++++++++++++++++++++ .woodpecker.yml | 34 ------------------ package.json | 2 +- 3 files changed, 55 insertions(+), 35 deletions(-) create mode 100644 .forgejo/workflows/build-deploy.yml delete mode 100644 .woodpecker.yml diff --git a/.forgejo/workflows/build-deploy.yml b/.forgejo/workflows/build-deploy.yml new file mode 100644 index 0000000..b153732 --- /dev/null +++ b/.forgejo/workflows/build-deploy.yml @@ -0,0 +1,54 @@ +name: Build and Deploy Website + +on: [push] + +jobs: + build: + name: Build Website + runs-on: docker + container: + image: node:lts + steps: + - uses: actions/checkout@v3 + - name: Install Dependencies + run: npm install + - name: Build Website + run: npm run build + - uses: actions/upload-artifact@v3 + with: + name: build + path: dist/ + deploy-dev: + name: Deploy Dev Website + runs-on: docker + container: + image: node:lts-alpine + needs: [build] + if: github.ref == 'refs/heads/develop' + steps: + - uses: actions/download-artifact@v3 + - name: Install Dependencies + run: which lftp || ( apk --update add lftp ) + - name: Deploy Website + run: lftp -e "set ftp:ssl-force true; set ssl:verify-certificate no; mirror -R ./build/ dev.sp-codes.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST + env: + FTP_HOST: ${{ secrets.FTP_HOST }} + FTP_USERNAME: ${{ secrets.FTP_USERNAME }} + FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} + deploy: + name: Deploy Website + runs-on: docker + container: + image: node:lts-alpine + needs: [build] + if: github.ref == 'refs/heads/main' + steps: + - uses: actions/download-artifact@v3 + - name: Install Dependencies + run: which lftp || ( apk --update add lftp ) + - name: Deploy Website + run: lftp -e "set ftp:ssl-force true; set ssl:verify-certificate no; mirror -R ./build/ sp-codes.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST + env: + FTP_HOST: ${{ secrets.FTP_HOST }} + FTP_USERNAME: ${{ secrets.FTP_USERNAME }} + FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index cefc273..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -1,34 +0,0 @@ -pipeline: - build: - image: node:lts - commands: - - npm install - - npm run build - deploy-dev: - image: alpine - secrets: - - FTP_HOST - - FTP_USERNAME - - FTP_PASSWORD - commands: - - which lftp || ( apk --update add lftp ) - - lftp -e "set ftp:ssl-force true; set ssl:verify-certificate no; mirror -R ./dist/ dev.sp-codes.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST - when: - branch: - - develop - event: - - push - deploy: - image: alpine - secrets: - - FTP_HOST - - FTP_USERNAME - - FTP_PASSWORD - commands: - - which lftp || ( apk --update add lftp ) - - lftp -e "set ftp:ssl-force true; set ssl:verify-certificate no; mirror -R ./dist/ sp-codes.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST - when: - branch: - - main - event: - - push diff --git a/package.json b/package.json index 05aea40..0b9272e 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "eleventy-sass": "^2.2.4", "glob": "^10.3.10", "minify": "^10.5.2", - "postcss": "^8.4.31", + "postcss": "^8.4.32", "sass": "^1.69.5", "uncss": "^0.17.3" },