This commit is contained in:
parent
890e2d528b
commit
89f22f491e
@ -15,17 +15,22 @@ jobs:
|
||||
- name: Install rsync
|
||||
run: apt install rsync -y
|
||||
|
||||
- name: Install Hugo
|
||||
run: apt install hugo -y
|
||||
|
||||
- name: Clone the repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Create the public directory
|
||||
run: mkdir /public /hugo_cache
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
- name: Build the website
|
||||
run: hugo --minify
|
||||
- name: Install @angular/cli
|
||||
run: npm install -g @angular/cli
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build Angular app
|
||||
run: ng build
|
||||
|
||||
- name: Add host key to known_hosts
|
||||
run: |
|
||||
@ -39,4 +44,5 @@ jobs:
|
||||
|
||||
- name: Deploy to server
|
||||
run: |
|
||||
rsync -avz -e 'ssh -p ${{ secrets.SERVER_PORT }}' --delete public/ ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }}:/var/www/todo.hstr.fr
|
||||
ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "rm -rf /var/www/todo.hstr.fr/*"
|
||||
rsync -avz -e 'ssh -p ${{ secrets.SERVER_PORT }}' --delete ./dist/todo-app-angular/* ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }}:/var/www/todo.hstr.fr
|
||||
|
Loading…
x
Reference in New Issue
Block a user