Designing a reliable power-to-X (PtX) process that uses renewable energy and grid electricity as backup power is challenging due to the uncertain nature of renewables and potential limits on grid usage. To address this challenge, this paper proposes a data-driven, reliability-based optimization approach for designing a grid-assisted PtX process and understanding how the uncertainty of time-series renewable profile affects its design and optimal sizing. This approach uses generative adversarial networks (GANs) to capture the complex patterns of renewables in temporal and spatial dimensions, rather than simply treating uncertainty as a probabilistic range as in conventional methods. The optimization considers both the mean and variance of production cost as objectives, while also taking into account the level of grid energy penetration as a probabilistic constraint through the reliability analysis. A power allocation and performance evaluation model is developed and used in conjunction with the optimization to assess uncertainty propagation through the PtX process and evaluate the impact of renewable uncertainty on process performance. A case study involving the production of methanol on Jeju Island in South Korea demonstrates how the mean and variance of production cost and other performance indicators can be balanced in the reliable design of PtX processes under renewable energy uncertainty, providing insights for decision-making in such situations.