Update workflow to generate directory listings. #7
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 app | ||
env: | ||
USERNAME: ${{ github.actor }} | ||
ADDRESS_SUFFIX: users.noreply.github.com | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
jobs: | ||
deploy-app: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Create CNAME file | ||
uses: "finnp/create-file-action@master" | ||
env: | ||
FILE_NAME: "public/CNAME" | ||
FILE_DATA: "audiomotion.app" | ||
- name: Generate Directory Listings | ||
uses: jayanta525/[email protected] | ||
with: | ||
FOLDER: public/music | ||
FOLDER: public/backgrounds | ||
- name: Run shell script | ||
run: | | ||
git config user.name "$USERNAME" | ||
git config user.email "$USERNAME@$ADDRESS_SUFFIX" | ||
git mv docs public | ||
git add * | ||
git commit -m "Deploy app" | ||
git subtree split --prefix public -b gh-pages | ||
git push -f origin gh-pages:gh-pages |