Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default defineUserConfig({
scopeName: "source.webgal",
path: path.resolve(__dirname, "../grammar/webgal.tmLanguage.json"),
},
"ts", "bash", "json", "xml", "kotlin",
"ts", "bash", "json", "xml", "kotlin", "yaml"
],

}),
Expand Down
49 changes: 49 additions & 0 deletions src/en/publish/web/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,55 @@

Select Export to Web in the upper right corner of the editor. The deployment method of the web page is the same as that of deploying a normal website. You can purchase cloud servers (Tencent Cloud, Alibaba Cloud) for deployment or use GitHub Pages.

### GitHub Pages

1. Create a repository on GitHub and clone it to your local machine.

2. `Copy all` the exported project source files to the root directory of the cloned repository.

3. In the `.github/workflows` directory of the cloned repository, create a file named `deploy.yml`, and its content should be as follows:
```yaml
name: WebGal Web Deploy to GitHub Pages

on:
push:
branches:
- main # The workflow is triggered when pushed to the main branch
workflow_dispatch: # Allows manual triggering of the workflow

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./ # You can also customize the file upload path (if you change the path)

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
```

4. In the `Pages` menu item under the storage repository settings you created, select `Build and deployment > Source > GitHub Actions`. This will enable `GitHub Actions`
Comment thread
xiaoxustudio marked this conversation as resolved.
Outdated

5. Push the code to the `main` branch and wait for the `GitHub Action` to complete. You should see the site deployed to `https://<username>.github.io/[repository]/` or `https://<custom-domain>/`, depending on your settings. From then on, the deployment will be automatically triggered every time you push to the `main` branch.

## If you use **Release Version**

Copy the files under /WebGAL (not the folder, the files under the /WebGAL folder) to the specified directory of the cloud server you want to deploy, or deploy to GitHub Pages.
Expand Down
49 changes: 49 additions & 0 deletions src/ja/publish/web/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,55 @@

エディタの右上にある「Web にエクスポート」を選択します。Web のデプロイ方法は、通常の Web サイトをデプロイする方法と変わりません。クラウドサーバー(Tencent Cloud、Alibaba Cloud など)を購入してデプロイするか、GitHub Pages を使用することができます。

### GitHub Pages

1. GitHub上にリポジトリを作成し、そのリポジトリをローカルに複製します。

2.エクスポートしたソースファイルをクローンリポジトリのルートディレクトリに`すべてコピーします`。

3.クローンリポジトリの`.github/workflows`ディレクトリに`deploy.yml`というファイルを作成します。
```yaml
name: WebGal Web Deploy to GitHub Pages

on:
push:
branches:
- main # ワークフローは、mainブランチにプッシュされるとトリガされます。
workflow_dispatch: # 手動でワークフローをトリガーできるようにしました

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./ # アップロードするファイルのパスをカスタマイズすることもできます(パスを変更した場合)。

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
```

4. 作成したリポジトリの `Pages` メニューから`Build and deployment > Source > GitHub Actions`を選択します。

5. `main` ブランチにプッシュして `GitHub Action` が完了するまで待ちます。サイトは`https://<username>.github.io/[repository]/`または`https://<custom-domain>/`に配置されています。設定によります。以後、`main`ブランチにプッシュされるたびに自動的に配置されます。

## **リリース版** を使用している場合

/WebGAL の下にあるファイル(フォルダではなく、/WebGAL フォルダの下にあるファイル)を、デプロイしたいクラウドサーバーの指定されたディレクトリにコピーするか、GitHub Pages にデプロイします。
Expand Down
50 changes: 50 additions & 0 deletions src/publish/web/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,56 @@

在编辑器右上角选择导出为网页。网页的部署方式,与部署一个正常网站的方式无异。你可以购买云服务器(腾讯云、阿里云)等部署或使用 GitHub Pages。

### GitHub Pages

1. 在 GitHub 上创建一个仓库,将仓库克隆到本地。

2. 将导出的项目源文件`全部复制`到克隆仓库的根目录下。

3. 在克隆仓库的 `.github/workflows` 目录中创建一个名为 `deploy.yml` 的文件,它的内容应该如下:
```yaml
name: WebGal Web Deploy to GitHub Pages

on:
push:
branches:
- main # 当推送到 main 分支时触发工作流
workflow_dispatch: # 允许手动触发工作流

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./ # 你也可以自定义上传的文件路径(如果你更改了路径的话)

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
```

4. 在你创建的仓库存储库设置中的`Pages`菜单项下,选择`Build and deployment > Source > GitHub Actions`,这样它将开启 `GitHub Actions`
Comment thread
xiaoxustudio marked this conversation as resolved.

5. 推送到 `main` 分支并等待 `GitHub Action` 完成。你应该看到站点部署到 `https://<username>.github.io/[repository]/` 或 `https://<custom-domain>/`,这取决于你的设置。此后每次推送到 `main` 分支时自动部署。


## 如果你使用**发行版**

复制/WebGAL 下的文件(不是文件夹,是/WebGAL 文件夹下的文件)到你想要部署的云服务器的指定目录下,或是部署到 GitHub Pages。
Expand Down