fix: Modify the Content for ActiveProcessorCount #103
This file contains hidden or 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: Deploy Next.js to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - feature/nextjs | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Generate SEO files (simple) | |
| run: | | |
| mkdir -p public | |
| POSTS=$(find posts -type f -name '*.mdx' | sed 's|posts/||;s|.mdx||') | |
| # sitemap.xml 생성 | |
| echo '<?xml version="1.0" encoding="UTF-8"?>' > public/sitemap.xml | |
| echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' >> public/sitemap.xml | |
| for POST in $POSTS; do | |
| echo " <url>" >> public/sitemap.xml | |
| echo " <loc>https://eottabom.github.io/post/$POST</loc>" >> public/sitemap.xml | |
| echo " <changefreq>weekly</changefreq>" >> public/sitemap.xml | |
| echo " <priority>0.7</priority>" >> public/sitemap.xml | |
| echo " </url>" >> public/sitemap.xml | |
| done | |
| echo '</urlset>' >> public/sitemap.xml | |
| # feed.xml 생성 | |
| echo '<?xml version="1.0" encoding="UTF-8"?>' > public/feed.xml | |
| echo '<rss version="2.0"><channel>' >> public/feed.xml | |
| echo '<title>eottabom.github.io</title>' >> public/feed.xml | |
| echo '<link>https://eottabom.github.io</link>' >> public/feed.xml | |
| echo '<description>Blog RSS Feed</description>' >> public/feed.xml | |
| echo "<lastBuildDate>$(date -u +"%a, %d %b %Y %H:%M:%S +0000")</lastBuildDate>" >> public/feed.xml | |
| for POST in $POSTS; do | |
| echo " <item>" >> public/feed.xml | |
| echo " <title>$POST</title>" >> public/feed.xml | |
| echo " <link>https://eottabom.github.io/post/$POST</link>" >> public/feed.xml | |
| echo " <guid>https://eottabom.github.io/post/$POST</guid>" >> public/feed.xml | |
| echo " <pubDate>$(date -u +"%a, %d %b %Y %H:%M:%S +0000")</pubDate>" >> public/feed.xml | |
| echo " </item>" >> public/feed.xml | |
| done | |
| echo '</channel></rss>' >> public/feed.xml | |
| - name: Build and Export | |
| run: | | |
| npm run build | |
| - name: Deploy to GitHub Pages | |
| if: success() && (hashFiles('out/index.html') != '') | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./out |