Merge branch 'master' of https://github.com/infinity-MSFS/infinity-ms… #18
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: Build and Deploy | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: 'latest' | ||
- name: Install dependencies | ||
run: bun install | ||
- name: Build project | ||
run: bun run build | ||
- name: Set Git identity | ||
run: | | ||
git config user.email "${{ secrets.GIT_EMAIL }}" | ||
git config user.name "${{ secrets.GIT_NAME }}" | ||
- name: Force push changes to production branch | ||
run: | | ||
git add . | ||
git commit -m "Deploy to production branch" | ||
git push --force origin HEAD:refs/heads/production | ||
- name: Deploy to GitHub Pages | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: 'dist' | ||
- name: Configure GitHub Pages deployment | ||
uses: actions/deploy-pages@v4 |