Merge branch 'main' of github.com:sak0a/provadis #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy PHP Project as Static Site | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' # Specify the PHP version you need | |
- name: Run PHP server and capture output | |
run: | | |
sudo apt-get install -y wget | |
php -S 127.0.0.1:8000 -t . & | |
sleep 5 | |
wget -r --convert-links -nH -P public --cut-dirs=1 http://127.0.0.1:8000 | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GH_TOKEN }} | |
publish_dir: ./public |