Skip to content

Commit

Permalink
Add deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Oct 12, 2024
1 parent fb73473 commit 2ac89be
Show file tree
Hide file tree
Showing 7 changed files with 354 additions and 219 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Deploy documentation

on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: docs/package.json
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
cache-dependency-path: docs/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Deploy to SFTP
if: github.ref == 'refs/heads/develop'
env:
SFTP_HOST: ${{ secrets.SFTP_HOST }}
SFTP_USERNAME: ${{ secrets.SFTP_USERNAME }}
SFTP_KEY: ${{ secrets.SFTP_KEY }}
SFTP_KNOWN_HOSTS: ${{secrets.SFTP_KNOWN_HOSTS}}
run: |
echo "$SFTP_KEY" > sftp_key
chmod 600 sftp_key
echo "$SFTP_KNOWN_HOSTS" > known_hosts
chmod 600 known_hosts
rsync -avz --delete -e "ssh -i sftp_key -o UserKnownHostsFile=known_hosts" dist/ $SFTP_USERNAME@$SFTP_HOST:/var/www/butterfly.linwood
web:
runs-on: ubuntu-24.04
defaults:
run:
working-directory: app
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v4
- uses: subosito/[email protected]
with:
flutter-version-file: app/pubspec.yaml
- name: Install dependencies
run: |
flutter pub get
- name: Set flavor
if: github.ref != 'refs/heads/main'
run: |
echo "SETONIX_FLAVOR=nightly" >> $GITHUB_ENV
echo "WEB_DIR=preview" >> $GITHUB_ENV
- name: Set flavor
if: github.ref == 'refs/heads/main'
run: |
echo "SETONIX_FLAVOR=stable" >> $GITHUB_ENV
echo "WEB_DIR=web" >> $GITHUB_ENV
- name: Build
run: flutter build web --wasm --release --no-web-resources-cdn --dart-define=flavor=$SETONIX_FLAVOR
- name: Deploy to SFTP
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
env:
SFTP_HOST: ${{ secrets.SFTP_HOST }}
SFTP_USERNAME: ${{ secrets.SFTP_USERNAME }}
SFTP_KEY: ${{ secrets.SFTP_KEY }}
SFTP_KNOWN_HOSTS: ${{secrets.SFTP_KNOWN_HOSTS}}
run: |
echo "$SFTP_KEY" > sftp_key
chmod 600 sftp_key
echo "$SFTP_KNOWN_HOSTS" > known_hosts
chmod 600 known_hosts
rsync -avz --delete -e "ssh -i sftp_key -o UserKnownHostsFile=known_hosts" build/web/ $SFTP_USERNAME@$SFTP_HOST:/var/www/$WEB_DIR.butterfly.linwood
85 changes: 0 additions & 85 deletions .github/workflows/documentation.yml

This file was deleted.

2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Version | Supported | |
| --------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| 2.2.1-dev | :warning: | [Docs](https://butterfly.linwood.dev/docs/2.1/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v2.2.0-rc.2) |
| 2.2.1-dev | :warning: | [Docs](https://butterfly.linwood.dev/docs/2.1/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v2.2.1-rc.1) |
| 2.2.0 | :white_check_mark: | [Docs](https://butterfly.linwood.dev/docs/2.2/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v2.2.0) |
| 2.1.1 | :x: | [Docs](https://butterfly.linwood.dev/docs/2.1/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v2.1.1) |
| 2.0.3 | :x: | [Docs](https://butterfly.linwood.dev/docs/2.0/intro) [Release](https://github.com/LinwoodDev/butterfly/releases/tag/v2.0.3) |
Expand Down
2 changes: 1 addition & 1 deletion app/android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.985.0)
aws-partitions (1.989.0)
aws-sdk-core (3.209.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
Expand Down
4 changes: 2 additions & 2 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1595,10 +1595,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: "4d45dc9069dba4619dc0ebd93c7cec5e66d8482cb625a370ac806dcc8165f2ec"
sha256: e5c39a90447e7c81cfec14b041cdbd0d0916bd9ebbc7fe02ab69568be703b9bd
url: "https://pub.dev"
source: hosted
version: "5.5.5"
version: "5.6.0"
win32_registry:
dependency: transitive
description:
Expand Down
8 changes: 4 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
"@astrojs/starlight": "^0.28.3",
"@phosphor-icons/react": "^2.1.7",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0",
"astro": "^4.16.0",
"@types/react-dom": "^18.3.1",
"astro": "^4.16.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"remark-gemoji": "^8.0.0",
"remark-heading-id": "^1.0.1",
"sharp": "^0.33.5",
"typescript": "^5.6.3"
},
"packageManager": "[email protected].0",
"packageManager": "[email protected].1",
"devDependencies": {
"sass": "^1.79.4"
"sass": "^1.79.5"
}
}
Loading

0 comments on commit 2ac89be

Please sign in to comment.