Merge pull request 'migrated woodpecker to forgejo workflow' (#201) from develop into main
All checks were successful
Build and Deploy Website / Build Website (push) Successful in 1m27s
Build and Deploy Website / Deploy Dev Website (push) Has been skipped
Build and Deploy Website / Deploy Website (push) Successful in 16s

Reviewed-on: #201
This commit is contained in:
Samuel Philipp 2023-12-06 22:36:19 +00:00
commit d67203d4af
3 changed files with 55 additions and 35 deletions

View file

@ -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 }}

View file

@ -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

View file

@ -28,7 +28,7 @@
"eleventy-sass": "^2.2.4", "eleventy-sass": "^2.2.4",
"glob": "^10.3.10", "glob": "^10.3.10",
"minify": "^10.5.2", "minify": "^10.5.2",
"postcss": "^8.4.31", "postcss": "^8.4.32",
"sass": "^1.69.5", "sass": "^1.69.5",
"uncss": "^0.17.3" "uncss": "^0.17.3"
}, },