Merge pull request 'develop' (#96) from develop into main
All checks were successful
Build and Deploy Website / Build Website (push) Successful in 1m4s
Build and Deploy Website / Deploy Dev Website (push) Has been skipped
Build and Deploy Website / Deploy Website (push) Successful in 20s

Reviewed-on: #96
This commit is contained in:
Samuel Philipp 2023-12-06 22:59:56 +00:00
commit 2dc9095df5
5 changed files with 64 additions and 87 deletions

View file

@ -1,44 +0,0 @@
kind: pipeline
type: docker
name: default
steps:
- name: build
image: node:lts
commands:
- npm install
- npm run build
- name: deploy-dev
image: alpine
environment:
FTP_HOST:
from_secret: FTP_HOST
FTP_USERNAME:
from_secret: FTP_USERNAME
FTP_PASSWORD:
from_secret: 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-magic.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST
when:
branch:
- develop
event:
- push
- name: deploy
image: alpine
environment:
FTP_HOST:
from_secret: FTP_HOST
FTP_USERNAME:
from_secret: FTP_USERNAME
FTP_PASSWORD:
from_secret: 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-magic.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST
when:
branch:
- main
event:
- push

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-magic.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-magic.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-magic.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-magic.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST
when:
branch:
- main
event:
- push

View file

@ -71,7 +71,7 @@ var uglify = require('gulp-terser');
var optimizejs = require('gulp-optimize-js');
// Styles
var sass = require('gulp-sass');
var sass = require('gulp-sass')(require('sass'));
var postcss = require('gulp-postcss');
var prefix = require('autoprefixer');
var minify = require('cssnano');

View file

@ -12,12 +12,12 @@
"url": "https://git.sp-codes.de/samuel-p/sp-magic.de"
},
"optionalDependencies": {
"browser-sync": "^2.27.5"
"browser-sync": "^2.29.3"
},
"devDependencies": {
"autoprefixer": "10.3.7",
"cssnano": "5.0.8",
"del": "6.0.0",
"autoprefixer": "10.4.16",
"cssnano": "6.0.1",
"del": "6.1.1",
"gulp": "4.0.2",
"gulp-concat": "2.6.1",
"gulp-flatmap": "1.0.2",
@ -25,15 +25,16 @@
"gulp-optimize-js": "1.1.0",
"gulp-postcss": "9.0.1",
"gulp-rename": "2.0.0",
"gulp-sass": "4.1.1",
"gulp-sass": "5.1.0",
"gulp-terser": "2.1.0",
"lazypipe": "1.0.2",
"node-sass-tilde-importer": "^1.0.2",
"postcss": "^8.3.11"
"postcss": "^8.4.32",
"sass": "^1.69.5"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.4",
"bootstrap": "^4.6.0",
"jquery": "^3.6.0"
"bootstrap": "^4.6.2",
"jquery": "^3.7.1"
}
}