2025-01-07 10:26:30 +00:00
|
|
|
name: Gitea Actions Demo
|
|
|
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
2025-01-07 10:51:20 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: ["main"]
|
2025-01-07 10:26:30 +00:00
|
|
|
|
|
|
|
jobs:
|
2025-01-07 10:51:20 +00:00
|
|
|
compile-html:
|
2025-01-07 10:26:30 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v4
|
2025-01-07 10:51:20 +00:00
|
|
|
|
|
|
|
- name: Setup python
|
|
|
|
uses: actions/setup-python@v5
|
|
|
|
with:
|
2025-01-07 10:55:59 +00:00
|
|
|
python-version: "3.11.2"
|
2025-01-07 10:51:20 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
2025-01-07 10:26:30 +00:00
|
|
|
run: |
|
2025-01-07 10:51:20 +00:00
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install -r requirements.txt
|
|
|
|
|
|
|
|
- name: Run the python application
|
2025-01-07 11:01:50 +00:00
|
|
|
run: python app.py
|
|
|
|
|
2025-01-07 11:43:59 +00:00
|
|
|
- name: List files in the repository
|
|
|
|
run: |
|
|
|
|
ls ${{ gitea.workspace }}
|
|
|
|
|
2025-01-07 11:01:50 +00:00
|
|
|
- name: Push the changes to the FTP server
|
2025-01-07 11:42:42 +00:00
|
|
|
uses: https://github.com/wangyucode/sftp-upload-action@v2.0.4
|
2025-01-07 11:01:50 +00:00
|
|
|
with:
|
2025-01-07 11:40:22 +00:00
|
|
|
host: ${{ secrets.FTP_SERVER }}
|
2025-01-07 11:42:42 +00:00
|
|
|
username: ${{ secrets.FTP_USERNAME }}
|
|
|
|
password: ${{ secrets.FTP_PASSWORD }}
|
2025-01-07 11:06:35 +00:00
|
|
|
port: 7008
|
2025-01-07 11:54:50 +00:00
|
|
|
localDir: '${{ gitea.workspace }}/dist'
|
|
|
|
remoteDir: '/vitrinekast'
|
2025-01-07 10:51:20 +00:00
|
|
|
|
2025-01-07 10:26:30 +00:00
|
|
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|