forked from MikuAuahDark/gws-pasta
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.31 KB
/
master.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
on:
push:
branches:
- master
name: 🚀 Deploy website on push
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: 📂 Sync files
uses: SamKirkland/[email protected]
with:
server: arxan.my.id
username: [email protected]
password: ${{ secrets.ftp_password }}
server-dir: /
- name: Setup venv
run: python -m venv venv
- name: Setup PyYAML
run: venv/bin/pip install pyyaml
- name: Generate Copypasta JSON
run: venv/bin/python generate_copypasta.py
- name: Copy Needed Files
run: |
set -e
mkdir _site
cp index.html _site/index.html
cp copypasta.json _site/copypasta.json
- name: GitHub Pages Artifact
uses: actions/upload-pages-artifact@v1
with:
retention-days: 90
deploy:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v2