Automating Qiita Article Updates with GitHub Actions

## Table of Contents
- [Introduction](#introduction)
- [Goals](#goals)
- [Skills Demonstrated](#skills-demonstrated)
  - [1. Automation and Efficiency Thinking](#1-automation-and-efficiency-thinking)
  - [2. Problem-Solving Using Tools](#2-problem-solving-using-tools)
  - [3. Ability to Modify and Adjust Code](#3-ability-to-modify-and-adjust-code)
  - [4. Website Customization and Design](#4-website-customization-and-design)
- [Steps to Implement](#steps-to-implement)
  - [1. Setting Up the Qiita API](#1-setting-up-the-qiita-api)
  - [2. Updating `index.html`](#2-updating-indexhtml)
  - [3. Automating with GitHub Actions](#3-automating-with-github-actions)
- [Conclusion](#conclusion)

## Introduction
**As an aspiring data analyst**, I sought to **automate the process** of updating Qiita articles on my **GitHub portfolio**. To allocate more time for actual data processing, I focused on implementing the **automation** as follows. This article explains my approach to integrating **GitHub** and **Qiita** using **GitHub Actions** to automatically fetch and update articles.

## Goals
- Fetch Qiita articles regularly.
- Update `index.html` with the latest article titles.
- Use GitHub Actions to automate this process every night.

## Skills Demonstrated
### 1. Automation and Efficiency Thinking
- Instead of manually updating Qiita articles on my portfolio, I created an automated process using GitHub Actions.
- Data analysts frequently automate data processing tasks using Excel, SQL, or Python, and this project demonstrates my ability to think about **efficiency and automation**.

### 2. Problem-Solving Using Tools
- I utilized ChatGPT to help clarify and implement my automation plan.
- Although I am not an engineer, I effectively learned and applied the necessary technical concepts to solve my problem.

### 3. Ability to Modify and Adjust Code

- I first explained my objectives to ChatGPT and had it generate all the necessary files and code, including Python, HTML, CSS, JavaScript, and YML. After that, I made adjustments to the HTML and CSS as needed. Since the JavaScript code required little modification once written, I left it as it was. For the Python and YML parts, I asked ChatGPT to make modifications as needed throughout the process.

- **To structure the portfolio effectively on a single page**, I considered how to present the necessary information in an **easily accessible way**. I developed the layout ideas and then **asked ChatGPT to generate the code** based on my suggestions. Afterward, I adjusted the design based on my **own judgment**, ensuring that the content was **well-organized** and **user-friendly**.

- When encountering issues, I either asked ChatGPT or searched for solutions online.

- My prior experience with MS-DOS and command prompt operations helped me quickly grasp Git’s local and remote functionality, allowing me to manage repositories without difficulty.

- Data analysts often use SQL and Python, and this experience showcases my ability to **modify and customize code even if I am not writing everything from scratch**.

### 4. Website Customization and Design
- As part of my portfolio, I wanted to display the **readme** at the top of the `index.html`, followed by my analysis results and links to a list of Qiita articles, all on a single page. To achieve this, I formatted the layout so that each section would be displayed like blog cards. This approach allowed me to focus on improving the user experience of the portfolio while also showcasing my skills in HTML/CSS and web design principles.

## Steps to Implement

### 1. Setting Up the Qiita API
First, we need to retrieve articles from Qiita. You can use the Qiita API to fetch your articles.

### 2. Updating `index.html`
In this step, the goal is to update the `index.html` file dynamically with the latest Qiita article titles. You can automate this by using a script that fetches the articles and updates the file content. Here’s a brief outline of the process:

- **Set up the Qiita API**: Fetch your articles using the Qiita API.
- **Modify `index.html`**: Dynamically update the HTML to display the latest articles from Qiita.

You can also create a GitHub Action to automate this process and schedule the updates regularly.

### 3. Automating with GitHub Actions
Create a `.github/workflows/qiita.yml` file to run the script daily.

## Conclusion
By automating the Qiita article updates, I streamlined my workflow and ensured my portfolio always displays the latest content. If you're building your portfolio as a data analyst, automating updates like this can be a great way to maintain a dynamic and up-to-date web presence.

This experience also highlights key data analyst skills such as **automation thinking**, **problem-solving using tools**, and **the ability to modify and adjust code**.