This commit is contained in:
parent
890e2d528b
commit
89f22f491e
@ -15,17 +15,22 @@ jobs:
|
|||||||
- name: Install rsync
|
- name: Install rsync
|
||||||
run: apt install rsync -y
|
run: apt install rsync -y
|
||||||
|
|
||||||
- name: Install Hugo
|
|
||||||
run: apt install hugo -y
|
|
||||||
|
|
||||||
- name: Clone the repository
|
- name: Clone the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Create the public directory
|
- name: Set up Node.js
|
||||||
run: mkdir /public /hugo_cache
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '22'
|
||||||
|
|
||||||
- name: Build the website
|
- name: Install @angular/cli
|
||||||
run: hugo --minify
|
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
|
- name: Add host key to known_hosts
|
||||||
run: |
|
run: |
|
||||||
@ -39,4 +44,5 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy to server
|
- name: Deploy to server
|
||||||
run: |
|
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