Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
fix: fix/ci (deployment) (#263)
Browse files Browse the repository at this point in the history
* fix: image path

* update: deploy yml
  • Loading branch information
ubugeeei authored Apr 28, 2024
1 parent ef1e1c0 commit 45639c8
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 80 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: deploy documents

on:
push:
branches:
- main # TODO:
paths:
- .github/workflows/vitepress.yml
- 'packages/docs/**'
workflow_dispatch:

permissions:
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: pnpm
- name: Setup
run: npm i -g @antfu/ni
- run: nci
- run: nr docs build
- run: echo 'handson.vuejs-jp.org' > CNAME
working-directory: packages/docs/.vitepress/dist
- uses: actions/upload-artifact@v3
with:
name: dist
path: packages/docs/.vitepress/dist

deploy:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' # PR 時はデプロイを実行しない
runs-on: ubuntu-latest
needs: build

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- uses: actions/download-artifact@v3
with:
name: dist
- uses: actions/upload-pages-artifact@v1
with:
path: .
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
69 changes: 0 additions & 69 deletions .github/workflows/vitepress.yml

This file was deleted.

2 changes: 1 addition & 1 deletion packages/docs/src/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@

これらのファイルが `create-vue` で作成されます。

![Vite App](./images/vite-app.png)
![Vite App](../images/vite-app.png)
14 changes: 7 additions & 7 deletions packages/docs/src/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

このハンズオンでは、簡単な商品の一覧を表示し、購入する商品を選択できるプログラムを作成します。プログラムを作成する過程で Vue.js の基本を学べます。

![vue-app](./images/sample.png)
![vue-app](../images/sample.png)

> このハンズオンを完了した場合の完成イメージは [こちら](https://handson-example.vuejs-jp.org/) で確認できます。
Expand Down Expand Up @@ -38,13 +38,13 @@ index.html
</noscript>
<div id="app">
<header class="header">
<img src="./images/logo.svg" alt="" />
<img src="../images/logo.svg" alt="" />
<h1>Vue.js ハンズオン</h1>
</header>
<main class="main">
<div class="item">
<div class="thumbnail">
<img src="./images/item1.jpg" alt="" />
<img src="../images/item1.jpg" alt="" />
</div>
<div class="description">
<h2>アボカドディップバケット</h2>
Expand All @@ -56,7 +56,7 @@ index.html
</div>
<div class="item">
<div class="thumbnail">
<img src="./images/item2.jpg" alt="" />
<img src="../images/item2.jpg" alt="" />
</div>
<div class="description">
<h2>あの日夢見たホットケーキ</h2>
Expand All @@ -68,7 +68,7 @@ index.html
</div>
<div class="item">
<div class="thumbnail">
<img src="./images/item3.jpg" alt="" />
<img src="../images/item3.jpg" alt="" />
</div>
<div class="description">
<h2>HOP WTR</h2>
Expand All @@ -80,7 +80,7 @@ index.html
</div>
<div class="item">
<div class="thumbnail">
<img src="./images/item4.jpg" alt="" />
<img src="../images/item4.jpg" alt="" />
</div>
<div class="description">
<h2>チーズフレンチフライ</h2>
Expand Down Expand Up @@ -200,7 +200,7 @@ body {
```html
<div class="item">
<div class="thumbnail">
<img src="./images/item1.jpg" alt="" />
<img src="../images/item1.jpg" alt="" />
</div>
<div class="description">
<h2>アボカドディップバケット</h2>
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ code .

アプリケーションのメニューで Visual Studio Code を起動し、「ファイル」-「フォルダーを開く」で自分の環境のプロジェクトディレクトリを選択します。

![vscode](./images/vscode.png)
![vscode](../images/vscode.png)

## 画像ファイルの配置

Expand Down
4 changes: 2 additions & 2 deletions packages/docs/src/v-for.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const tasks = ref(['タスクA', 'タスクB', 'タスクC'])
・タスクC
```

![v-for 構文の出力例](./images/v_for_result1.png)
![v-for 構文の出力例](../images/v_for_result1.png)

## 複数の商品をレンダリング

Expand Down Expand Up @@ -164,7 +164,7 @@ v-for を使った template タグは DOM 要素としてレンダリングさ

このように `v-for` を使うことで、以下のように商品を複数レンダリングできるようになりました。

![複数の商品をレンダリングの出力例](./images/v_for_result2.png)
![複数の商品をレンダリングの出力例](../images/v_for_result2.png)

<PlusOne />

Expand Down

0 comments on commit 45639c8

Please sign in to comment.