-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marco Blumendorf
committed
Jan 5, 2025
1 parent
aba5f43
commit fc1786a
Showing
1 changed file
with
37 additions
and
34 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,28 @@ permissions: | |
id-token: write | ||
|
||
jobs: | ||
build: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
name: Create Release | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: release-v${{ github.run_number }} | ||
release_name: Release ${{ github.sha }} | ||
draft: false | ||
prerelease: false | ||
|
||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
name: GitHub Pages - Build and Deploy | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -41,54 +61,37 @@ jobs: | |
with: | ||
path: './dist' | ||
|
||
|
||
create-release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: release-v${{ github.run_number }} | ||
release_name: Release ${{ github.sha }} | ||
draft: false | ||
prerelease: false | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
|
||
ftp-deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: FTP - Build and Deploy | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download build artifacts | ||
uses: actions/download-artifact@v4 | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
name: github-pages | ||
path: artifact | ||
node-version: '20' | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Extract artifact | ||
run: tar -xf artifact/artifact.tar -C artifact | ||
- name: Build for FTP | ||
run: pnpm build --base=/ | ||
|
||
- name: Deploy to FTP | ||
uses: SamKirkland/[email protected] | ||
with: | ||
server: ${{ secrets.FTP_SERVER }} | ||
username: ${{ secrets.FTP_USERNAME }} | ||
password: ${{ secrets.FTP_PASSWORD }} | ||
local-dir: artifact/ | ||
protocol: ftps | ||
local-dir: dist/ |